<template>
    <div class="paginations">
    <el-pagination style="margin-button:25px;"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="attribute.currentPage"
      :page-sizes="[10, 20, 50, 100]"
      :page-size="attribute.pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="attribute.count"
    ></el-pagination>

  </div>
</template>

<script>
//引入vuex
import { mapState } from "vuex";
export default {
  methods: {
    handleSizeChange(e) {
      let payload = {
        size: e
      };

      this.$store.dispatch("attributegetAdminAttribute", payload);
    },
    handleCurrentChange(e) {
      let payload = {
        currnet: e
      };

      this.$store.dispatch("attributegetAdminAttribute", payload);
    }
  },
  computed: {
    ...mapState(["attribute"])
  }
}
</script>

<style lang='less' scoped>
.paginations {
  width: 100%;
  height: 40px;
  position: absolute;
  right: 0;
  bottom: 25px;
  .el-pagination {
    float: right;
  }
}
</style>